#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
typedef struct stu
{
	char name[20];
	int ch;
	int ma;
	int en;
	int sum;
}stu;
int main()
{
	int n = 0;
	scanf("%d", &n);
	stu* ps = (stu*)calloc(n, sizeof(stu));
	int tgt = 0;
	for (int i = 0; i < n; i++)
	{
		scanf("%s%d%d%d", ps[i].name, &ps[i].ch, &ps[i].ma, &ps[i].en);
		ps[i].sum = ps[i].ch + ps[i].ma + ps[i].en;
		if (i >= 1 && ps[i].sum > ps[tgt].sum)tgt = i;
	}
	printf("%s %d %d %d\n", ps[tgt].name, ps[tgt].ch, ps[tgt].ma, ps[tgt].en);
	return 0;
}